<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-lr-10"> 

<form name="form" action="?m=bbs&c=bbs&a=init&menuid=<?php echo $_GET['menuid'];?>" method="get" >
<input type="hidden" value="bbs" name="m">
<input type="hidden" value="bbs" name="c">
<input type="hidden" value="init" name="a">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td><div class="explain-col">
		Email:<input type="text" class="input-text" name="search[email]" size='20' value="<?=isset($search['email'])?$search['email']:''?>"/>
		名字:<input type="text" class="input-text" name="search[name]" size='20' value="<?=isset($search['name'])?$search['name']:''?>"/>
		关键字:<input type="text" value="<?=isset($search['keywords'])?$search['keywords']:''?>" class="input-text" name="search[keywords]" size='20'>
		
		<?php echo L('times')?>  <?php echo form::date('search[start_time]',(isset($search['start_time'])?$search['start_time']:''),'1')?>
		<?php echo L('to')?>   <?php echo form::date('search[end_time]',(isset($search['end_time'])?$search['end_time']:''),'1')?>    <input type="submit" value="<?php echo L('determine_search')?>" class="button" name="dosubmit">
		</div>
		</td>
		</tr>
    </tbody>
</table>
</form>

<form name="myform" id="myform" action="?m=bbs&c=bbs&a=delete" method="post" >
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
			<th width="10%" align="center">留言者</th>
 			<th width="15%">标题</th>
 			<th width="15%">名字</th>
 			<th width="35%">留言信息</th>
			<th width="10%" align="center">日期</th>
 			<th width="15%" align="center">操作</th>
		</tr>
	</thead>
<tbody>
<?php
if(is_array($infos)){
	foreach($infos as $info){
		?>
	<tr>
		<td align="center" width="35"><input type="checkbox" name="id[]" value="<?php echo $info['id']?>"></td>
		<td width="10%" align="center"><?php echo $info['email'];?></td>
 		<td width="15%"><?php echo $info['title']?></td>
 		<td width="10%"><?php echo $info['name']?></td>
 		<td width="35%"><?php echo $info['liuyan']?></td>
		<td align="center" width="20%"><?php echo $info['datetime'];?> </td>
	  	<td align="center" width="10%">
		<a href="###" onclick="edit_type(<?php echo $info['id'];?>, '<?php echo $info['name'];?>')"
 title="<?php echo L('edit')?>"><?php echo L('edit')?></a> 
		</td>
	</tr>
	<?php
	}
}
?>
</tbody>
</table>
</div>
<div class="btn"><a href="#"
	onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all')?></a>/<a
	href="#"
	onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a>
<input name="submit" type="submit" class="button" value="删除选中" onClick="return confirm('是否批量删除？')">&nbsp;&nbsp;

</div>
<div id="pages"><?php echo $pages?></div>
</form>
</div>
</body>
</html>
<script type="text/javascript">
function call(id) {
	window.top.art.dialog({id:'call'}).close();
	window.top.art.dialog({title:'<?php echo L('call_code')?>', id:'call', iframe:'?m=dianping&c=dianping&a=public_call&typeid='+id, width:'600px', height:'300px'}, function(){window.top.art.dialog({id:'call'}).close();}, function(){window.top.art.dialog({id:'call'}).close();})
}

function edit_type(id, name) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'修改 '+name+' ',id:'edit',iframe:'?m=dianping&c=dianping&a=edit_type&dianpingid='+id,width:'550',height:'350'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
} 
</script>

